package priv.lirenhe.javabase.charpter03_4_04;

public class Constructor01 {

	
	
	//构造方法的重载
	public Constructor01() {
		System.out.println("构造方法");
	}
	
	public Constructor01(String str) {
		System.out.println(str);
	}
	public Constructor01(String str,int i) {
		System.out.println(str);
		System.out.println(i);
	}
	
	public static void main(String[] args) {
		//构造方法在实例化对象时会被执行
		Constructor01 obj = new Constructor01();
		Constructor01 obj01 = new Constructor01("有参构造方法");
		Constructor01 obj02 = new Constructor01("有参构造方法",0);
	}
	
	public String returnStr(){
		return "";
	}

}
